//import './style.less'
//import { Configuration, OpenAIApi } from "openai";
const { Configuration, OpenAIApi } = require("openai")
const configuration = new Configuration({
  apiKey: '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',
});

const openai = new OpenAIApi(configuration);

//const completion = openai.createChatCompletion({
//  model: "gpt-3.5-turbo",
//  messages: [{role: "user", content: "Hello world"}],
//}).then((completion) => {
//  console.log(completion.data.choices[0].message);
//})

const resText = openai.createCompletion({
  model: "text-davinci-003",
  prompt: 'hellp',
  max_tokens: 1234,
  temperature: 0.5,
}).then((resText) => {
  console.log(resText.data.choices[0].text);
})
